<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <h2>
      this is h2
       <Button @click="click2" type="info">添加</Button>
    </h2>
    <h2>Essential Links</h2>
    <div class="hello-tip fz-60 w-200">
      this is tip
    </div>
    <div style="margin-left:300px;margin-top:30px;">
      <Button @click="click" type="error">删除</Button>
    </div>

    <Button type="info">Info</Button>
    <Button type="succes">Succes</Button>
    <Button type="error">Error</Button>
    <Button type="warning">Warning</Button>
    <Button shape="circle" icon="ios-search"></Button>

      <Input v-model="value" placeholder="Enter Something.." style="width:300px" />
    <RadioGroup v-model="button1" type="button">
      <Radio label="北京">北京</Radio>
      <Radio label="上海">上海</Radio>
      <Radio label="深圳">深圳</Radio>
      <Radio label="杭州">杭州</Radio>
    </RadioGroup>

    <CheckboxGroup v-model="fruit">
      <Checkbox label="苹果">苹果</Checkbox>
      <Checkbox label="香蕉">香蕉</Checkbox>
      <Checkbox label="西瓜">西瓜</Checkbox>
    </CheckboxGroup>

    <DataPicker type="date" placeholder="Select date" style="width:200px" @on-change="onDateChange"></DataPicker>
    <router-link to="/login">Go to login</router-link>
  </div>
</template>

<script>
//import Button from "./Button.vue";
export default {
  name: "HelloWorld",
  components: {
    //Button
  },
  data() {
    return {
      msg: "Welcome to Your Vue.js App",
      value:'',
      button1:'杭州',
      fruit:[]
    };
  },
  methods:{
    click (e){
      console.log('------',this.value,this.button1,this.fruit)
    },
    click2 (e){
      console.log('click2')
    },
    onDateChange(a,b){
      console.log(a,b)
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
$height: 400px;
$width: 200px;

@function fn ($height) {
  @return $height / 3;
}

@mixin rounder-corners($radius) {
  -moz-border-radius: $radius;
  -webkit-border-radius: $radius;
  border-radius: $radius;
}

.hello {
  h1 {
    color: red;
    h2 {
      color: blue;
      &:hover {
        color: black;
      }
    }
  }
  h2 {
    color: green;
  }
  &-tip {
    color: greenyellow;
    font: {
      size: 40px;
      weight: bold;
      style: italic;
    }
    @include rounder-corners(30px);
    width: $width;
    height: fn(900px);
    background: gray;
    @if $width > 2000px {
      color: rebeccapurple;
    }
  }
}
</style>

